<h1 class="crayons-title mb-4">Create badge</h1>

<%= form_for [:admin, @badge], method: :post do |form| %>
  <div class="crayons-card p-6 flex flex-col gap-4">
    <div class="crayons-field">
      <%= form.label :title, "Title", class: "crayons-field__label" %>
      <%= form.text_field :title, class: "crayons-textfield" %>
    </div>

    <div class="crayons-field">
      <%= form.label :description, "Description", class: "crayons-field__label" %>
      <%= form.text_field :description, class: "crayons-textfield" %>
    </div>

    <div class="crayons-field">
      <%= form.label :badge_image, "Badge image", class: "crayons-field__label" %>
      <%= form.file_field :badge_image, class: "" %>
    </div>

    <div class="crayons-field">
      <%= form.label :credits_awarded, "Credits awarded", class: "crayons-field__label" %>
      <%= form.text_field :credits_awarded, class: "crayons-textfield" %>
    </div>

    <div class="crayons-field crayons-field--checkbox ">
      <%= form.check_box :allow_multiple_awards, class: "crayons-checkbox" %>
      <%= form.label :allow_multiple_awards, class: "crayons-field__label" do %>
        Allow multiple awards
      <p class="crayons-field__description">Allows this badge to be awarded multiple times to the same user</p>
      <% end %>
    </div>


    <div>
      <%= submit_tag "Create Badge", class: "c-btn c-btn--primary" %>
    </div>
  </div>
<% end %>
